﻿using MathExp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestMathExp
{
    class Program
    {
        static void Main(string[] args)
        {
            var calc = new Calculator();
            calc.SetVar("a", 1);
            calc.SetVar("b", 2);
            Console.WriteLine("t0: " + calc.Calc("311"));
            Console.WriteLine("t1: " + calc.Calc("31+2-5*0"));
            Console.WriteLine("t2: " + calc.Calc("31+(2-5)*0"));
            Console.WriteLine("t3: " + calc.Calc("3.99*0.9*6.83*1.15"));
            Console.WriteLine("t4: " + calc.Calc("a+b"));
            Console.ReadKey();
            Console.WriteLine("**********");
        }
    }
}
